package test.gateway.a.controllers;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import test.gateway.a.remote.TokenService;

import java.util.UUID;

@RestController
@Slf4j
public class EchoController {
    @Autowired
    private TokenService tokenService;

    @GetMapping("/echo")
    public String echo(String msg){
        log.info("service-a 打印点日志看看:[{}]",msg);
        return "hello "+msg;
    }

    @GetMapping("/token")
    public String token(){
        log.info("收到请求，主要是测试 traceId 和 spanId ");
        return tokenService.token();
    }
}
